package com.example.anydo.net;

import android.content.Context;

import okhttp3.OkHttpClient;

public class NetClient {

    private static NetClient netClient;
    private OkHttpClient client;
    private NetClient() {
        client = new OkHttpClient();
    }

    public static NetClient getInstance( ) {
        if (netClient == null) {
            synchronized (NetClient.class) {
                if (netClient == null) {
                    netClient = new NetClient();
                }
            }
        }
        return netClient;
    }


    public RequestBuilder withUrl(String url) {
        return new RequestBuilder(url,client);
    }
}
